<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html>
<head>
<meta charset="UTF-8"/>
<title>运营平台</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="renderer" content="webkit">
<!--<meta http-equiv="X-UA-Compatible" content="IE=edge">-->
<link type="text/css" rel="stylesheet" href="<?php echo get_style_cdnurl();?>paimai/yunying/css/common.css?v=20170207" />
<link type="text/css" rel="stylesheet" href="<?php echo get_style_cdnurl();?>paimai/yunying/css/table.css?v=20170117" />
<link type="text/css" rel="stylesheet" href="<?php echo get_style_cdnurl();?>paimai/yunying/css/jquery-ui.css" />
<script src="<?php echo get_style_cdnurl();?>paimai/yunying/js/jquery-1.11.1.js" type="text/javascript"></script>
<script src="<?php echo get_style_cdnurl();?>paimai/yunying/js/jquery-ui.min.js" type="text/javascript"></script>
 <script src="<?php echo get_style_cdnurl();?>paimai/yunying/js/yunIndex.js" type="text/javascript"></script>
<script src="<?php echo get_style_cdnurl();?>paimai/yunying/js/jquery-ym-datePlugin-0.1.js" type="text/javascript"></script>
<script src="<?php echo get_style_cdnurl();?>paimai/yunying/js/global.js" type="text/javascript"></script>
<script src="<?php echo get_style_cdnurl();?>paimai/cheshan/js/common.js" type="text/javascript"></script>
<script type="text/javascript" src="<?php echo get_style_cdnurl();?>paimai/yunying/js/jquery.placeholder.min.js"></script>
<script type="text/javascript">
 $(function(){
     $("input").placeholder();
     if (navigator.userAgent.indexOf("Safari") > -1) {
       $("input").css("lineHeight","normal !important");
     };
});
</script>

</head>
<body>
<body>
<div class="header">
<div class="headerCo">
<span>你好,<?php echo ($user_info["real_name"]); ?><a href="<?php echo (WEB_URL); ?>Emp/logout">退出</a></span>
<h1><img src="<?php echo get_style_cdnurl();?>paimai/yunying/images/yun_logo.jpg"></h1>
</div>
</div>

<div class="mian">
    <div class="mianL">
    <dl>
        <dd>
            <a id="menu_sy" href="/Index/index" class="shouye">首页</a>
        </dd>
        <?php foreach ($tree_menu as $key => $value): ?>
          <dd>
            <span id="menu_<?php echo ($value['first_char']); ?>" ><img src="<?php echo get_style_cdnurl();?>paimai/yunying/images/yun_jia.jpg"><?php echo ($value['name']); ?></span>
            <ul style="display: none;">
                <?php if (!empty($value['children'])): ?>
                    <?php foreach ($value['children'] as $k => $v): ?>
                        <li><a id='menu_<?php echo ($v["first_char"]); ?>' href="<?php echo ($v['url']); ?>"><?php echo ($v['name']); ?></a></li>
                    <?php endforeach ?>
                <?php endif ?>
            </ul>
        <?php endforeach ?>
    </dl>
</div>

<?php $menu = 'zhgl.ygzh'; ?>
<?php $menu=json_encode(explode('.', $menu)); ?>
<script>
    $(function () {
        var cur_menu = '<?php echo ($menu); ?>', cur_menu = eval('[' + cur_menu + ']'), cur_menu = cur_menu[0];
        if (cur_menu == "sy") {
            $("#menu_sy").removeClass('shouye').addClass('current');
        }
        $('#menu_' + cur_menu[0]).click();
        $('#menu_' + cur_menu[0]).find("img").attr("src", "http://img1.isou365.cn/paimai/yunying/images/yun_jie.jpg");
        $(".mianL").css("height", $(document).height() - 95);
        $('#menu_' + cur_menu[1]).addClass('current');
    });
</script>
    <div class="mianR">

        <div class="listBox">
            <form id="fm" action="/Emp/index" method="GET">
                <div class="yuList">

                    <div class="xinzeng clearfix">
                        <a href="/Emp/group_add"><input type="button" onclick="create_emp();" value="新增分组"/></a>
                    </div>
                    <div class="yuListCo">
                        <h4 class="clearfix"><em class="listW1">ID</em>
                            <em class="listW4">组名称</em>
                            <em class="listW5">描述</em>
                            <em class="listW7">状态</em>
                            <em class="listW8-2">操作</em>
                        </h4>
                        <ul>
                            <?php foreach ($glist as $key =>$group): ?>
                            <li class="listBg clearfix">
                                <em class="listW1"><?php echo ($group["id"]); ?></em>
                                <em class="listW4"><?php echo ($group["title"]); ?></em>
                                <em class="listW5"><?php echo ($group["remark"]); ?></em>
                                <em class="listW7"><?php echo ($group['status']?'禁用':'启用'); ?></em>
                                <em class="listW8-2">
                                    <a href="/Emp/group_add/group_id/<?php echo ($group["id"]); ?>">编辑</a>
                                    <?php if(($group["status"] == 1)): ?><a href="" onclick="return ci_op('<?php echo ($group["id"]); ?>',0);">启用</a>
                                        <?php else: ?>
                                        <a href="" onclick="return ci_op('<?php echo ($group["id"]); ?>',1);">禁用</a><?php endif; ?>
                                    <a href="" onclick="return ci_op('<?php echo ($group["id"]); ?>',-1);">删除</a>
                                </em>
                            </li>
                            <?php endforeach ?>

                        </ul>
                    </div>


                </div>
            </form>

        </div>
    </div>
    <div class="clear"></div>
</div>


<script>
    function ci_op(group_id, op_type) {
        var post_data = {group_id: group_id, op_type: op_type};
        $.post('/Emp/ci_group_op', post_data, function (res) {
            if (res.code == 200) {
                delay_alert('操作成功!');
                setTimeout(function () {
                    window.location.reload();
                }, 300);
            } else {
                delay_alert(res.msg);
            }
        }, 'json');
        return false;
    }
    ;


</script>

<div class="yunBei"></div>
<div class="loading"></div>
</body>
</html>